Detekt
Detekt is a static code analysis tool for Kotlin used in Android development. It identifies issues, enforces standards, and improves code quality by checking for code smells, performance issues, bugs, and adherence to best practices, with configurable rules and plugins for customization. Its integration into workflows promotes clean and efficient Kotlin codebases.
The Appcircle Detekt step executes the Detekt Gradle task. For further details, please refer to the Run detekt using the Detekt Gradle Plugin documentation.
Prerequisites
Before running the Detekt step, you must complete certain prerequisites, as detailed in the table below:
Prerequisite Workflow Step | Description |
---|---|
Git Clone | The Git Clone step is necessary to fetch the repository before conducting code checks and must precede the Detekt step. |
Input Variables
This step contains some input variable(s). It needs these variable(s) to work. The table below gives explanation for this variable(s).
Variable Name | Description | Status |
---|---|---|
$AC_DETEKT_TASK | Specifies the name of the Detekt task. The default value is detekt . | Required |
$AC_DETEKT_EXTRA_PARAMETERS | Additional command-line parameters for Detekt. | Optional |
$AC_DETEKT_SAVE_REPORT | Specifies whether the Detekt report will be saved. If set to true , report files will be saved into the artifacts folder. The default value is false . | Optional |
$AC_DETEKT_OUTPUT_PATH | Specifies the Detekt output path. If the $AC_DETEKT_SAVE_REPORT input is set to true and this value is not defined, then <ac_module>/build/reports will be used as the default path. | Optional |
If $AC_DETEKT_SAVE_REPORT
is set to true
, place the Export Build Artifacts step after the Detekt step to ensure proper transfer of outputs to the Download Artifacts section.
Output Variables
The output is not stored in any variable. If AC_DETEKT_SAVE_REPORT
is set to true
, the file output will be saved in the $AC_PROJECT_PATH/$AC_MODULE/build/reports
directory (check these variables on the Appcircle-Specific Environment Variables page). If you've added the Export Build Artifacts step after the Detekt step, this output will also be accessible in the Download Artifacts section.
To access the source code of this component, please use the following link: